<div class="crate row" data-test-crate-row ...attributes>
  <div class='desc'>
    <div class='info'>
      <LinkTo @route="crate" @model={{this.crate.id}} data-test-crate-link>{{ this.crate.name }}</LinkTo>
      <CrateTomlCopy @copyText={{this.crateTomlText}} @inline={{true}} />
      <CrateBadge @crate={{this.crate}} />
      {{#each this.crate.annotated_badges as |badge|}}
        {{#let (component badge.component_name) as |Badge|}}
          <Badge @badge={{badge}} data-test-badge={{badge.badge_type}} />
        {{/let}}
      {{/each}}
    </div>
    <div class='summary' data-test-description>
      <span class='small'>
        {{ truncate-text this.crate.description }}
      </span>
    </div>
  </div>
  <div class='stats'>
    <div class='downloads' data-test-downloads>
      {{svg-jar "download"}}
      <span class='num'><abbr title="Total number of downloads">All-Time:</abbr> {{ format-num this.crate.downloads }}</span>
    </div>
    <div class="recent-downloads" data-test-recent-downloads>
      {{svg-jar "download"}}
      <span class='num'><abbr title="Downloads in the last 90 days">Recent:</abbr> {{ format-num this.crate.recent_downloads }}</span>
    </div>
    <div class="updated-at" >
      {{svg-jar "latest-updates" height="32" width="32"}}
      <span>
        <abbr title="The last time crate was updated">Updated:</abbr>
        <time title="Last updated: {{ this.crate.updated_at }}" datetime="{{ moment-format this.crate.updated_at 'YYYY-MM-DDTHH:mm:ssZ' }}" data-test-updated-at>
          {{ moment-from-now this.crate.updated_at }}
        </time>
      </span>
    </div>
  </div>
  <div class="quick-links">
    <ul>
      {{#if this.crate.homepage}}
        <li><a href="{{this.crate.homepage}}">Homepage</a></li>
      {{/if}}
      {{#if this.crate.documentation}}
        <li><a href="{{this.crate.documentation}}">Documentation</a></li>
      {{/if}}
      {{#if this.crate.repository}}
        <li><a href="{{this.crate.repository}}">Repository</a></li>
      {{/if}}
    </ul>
  </div>

</div>